Skip to content

ci: deploy vcpkg port from vcpkg-windows x64 Release with ps1 scripts; bootstrap fresh windows vcpkg; bump vcpkg baseline - #4

Merged
igagis merged 14 commits into
mainfrom
ci-deploy-vcpkg-from-msys2
Dec 2, 2026
Merged

igagis merged 14 commits into
mainfrom
ci-deploy-vcpkg-from-msys2

Conversation

@igagis-bot

@igagis-bot igagis-bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the failing vcpkg - windows - x64 | Release deploy step on release tags (e.g. 1.0.2).

Root cause: The deploy vcpkg port step used the vcpkg bundled with the windows-latest GitHub hosted runner. That vcpkg is too old to process the published cppfw/vcpkg-repo registry, so vcpkg ... x-add-version --all fails with error: cssom is not properly formatted (and similar errors for every port).

Fix:

  • Bump the vcpkg baseline: microsoft/vcpkg → ed403b3 (master) and cppfw/vcpkg-repo → 8bfce7f (main).
  • Bootstrap a fresh upstream vcpkg via the windows bootstrap (powershell.exe scripts/bootstrap.ps1) instead of the broken msys bootstrap.
  • Move the deploy vcpkg port step from the broken vcpkg-windows job into the vcpkg - windows - x64 | Release leg (release tags only), using the new myci-vcpkg-deploy.ps1 / myci-git-askpass.ps1 scripts from myci 0.1.233.
  • The vcpkg-msys2 job keeps build/prepare with the fixed windows bootstrap and no deploy step (the deploy now lives in vcpkg - windows).

Note the msys2 job bootstraps a full fresh vcpkg via git clone https://github.com/microsoft/vcpkg.git + powershell.exe scripts/bootstrap.ps1.

Notes

  • The vcpkg - windows - x64 | Release leg runs install fresh upstream vcpkg + deploy vcpkg port only on release tags; other matrix legs keep the bundled vcpkg and no fresh bootstrap is performed.
  • The broken 1.0.2 tag will still fail (it pins the old ci.yml); the deploy is fixed for the next release cut from a commit containing this change.

🤖 Generated with Claude Code

The vcpkg bundled in the windows runners is too old to process the
published cppfw/vcpkg-repo registry (x-add-version fails with
'not properly formatted' errors), so the deploy step of vcpkg-windows
always failed. Move the port deployment to a dedicated vcpkg-msys2 job
(windows-latest, msys2 shell) that bootstraps a fresh upstream vcpkg,
mirroring the linux CI approach. The deploy still runs on release tags
only; the vcpkg-windows job keeps build/test and no longer deploys.

Also note this fixes the vcpkg deploy on 1.0.2-size tags: the
previous tag's deploy step will still fail on the old vcpkg unless
the new tag is cut from a commit containing this change.
…resh windows vcpkg; bump vcpkg baseline

- update vcpkg baseline (microsoft/vcpkg ed403b3, cppfw/vcpkg-repo 8bfce7f)
- fix vcpkg-msys2: bootstrap the windows vcpkg instead of the broken msys bootstrap
- move deploy step to the vcpkg-windows x64|Release leg (release tags only), using
  the new myci 0.1.233 powershell scripts (myci-vcpkg-deploy.ps1 / myci-git-askpass.ps1)
@igagis-bot igagis-bot changed the title ci: deploy vcpkg port from msys2 job with fresh upstream vcpkg ci: deploy vcpkg port from vcpkg-windows x64 Release with ps1 scripts; bootstrap fresh windows vcpkg; bump vcpkg baseline Dec 1, 2026
Comment thread .github/workflows/ci.yml Outdated
run: |
cd build/vcpkg/test
./${{ matrix.config }}/test.exe
- name: install fresh upstream vcpkg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add "... for deploy"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — renamed the step to 'install fresh upstream vcpkg for deploy'.

igagis and others added 7 commits December 1, 2026 18:05
The fix-askpass-path temporary ref was needed while myci PR #13 was
under review. Now that it is merged to main, point the myci checkout at
main (the script it carries fixes the GIT_ASKPASS path resolution and
mirrors the bash deploy script). Switch to 'latest' once myci 0.1.234
is released.
Comment thread .github/workflows/ci.yml Outdated
run: |
cd build/vcpkg/test
./${{ matrix.config }}/test.exe
- name: deploy vcpkg port for deploy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now the "for deploy" is not needed in the name, remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed 'for deploy' from the step name.

The vcpkg bundled with the windows runner handles the published vcpkg
registry identically to a fresh upstream vcpkg for the deploy flow
(verified locally). Keep the autocrlf disable.
myci-vcpkg-deploy.ps1 (and its askpass) is being removed in favor of
the bash twin, which works in Git Bash on windows runners. Invoke it
with shell: bash and add VCPKG_ROOT to PATH since the script calls
vcpkg directly.
Comment thread .github/workflows/ci.yml Resolved
The deploy step runs the vcpkg repo update, which should only happen
for release tags, not on every PR or main push. Emits nothing on PRs
the first time the gate is exercised; the tag-gated deploy remains.
Comment thread .github/workflows/ci.yml
git config --global core.autocrlf false
# the deploy script invokes vcpkg directly, so add its root to PATH
export PATH="$VCPKG_ROOT:$PATH"
bash myci/src/bash/myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${{ env.PACKAGE_NAME }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash is needed explicitly here for two reasons:

  1. The step's shell defaults to PowerShell (defaults.run.shell: powershell). The step must override it (shell: bash), because the script is a POSIX-style shell script, not a PowerShell script — PowerShell's parser doesn't understand export PATH=..., # comments, or the POSIX ls/cp/rm-style invocations.
  2. shell: bash alone is not enough. Git for Windows does not preserve the executable bit on checkout (core.filemode=false), so ./myci/src/bash/myci-deploy-vcpkg.sh won't run — it lacks the +x. Invoking via bash <script> makes bash interpret the file as a script regardless of its permissions.

The same applies to the .sh GIT_ASKPASS helper — it's spawned via its #!/bin/bash shebang through bash, not as a bare executable.

@igagis
igagis merged commit 57e7310 into main Dec 2, 2026
1 of 6 checks passed
igagis added a commit that referenced this pull request Dec 2, 2026
…; bootstrap fresh windows vcpkg; bump vcpkg baseline (#4)

* ci: deploy vcpkg port from msys2 job with fresh upstream vcpkg

The vcpkg bundled in the windows runners is too old to process the
published cppfw/vcpkg-repo registry (x-add-version fails with
'not properly formatted' errors), so the deploy step of vcpkg-windows
always failed. Move the port deployment to a dedicated vcpkg-msys2 job
(windows-latest, msys2 shell) that bootstraps a fresh upstream vcpkg,
mirroring the linux CI approach. The deploy still runs on release tags
only; the vcpkg-windows job keeps build/test and no longer deploys.

Also note this fixes the vcpkg deploy on 1.0.2-size tags: the
previous tag's deploy step will still fail on the old vcpkg unless
the new tag is cut from a commit containing this change.

* ci: deploy vcpkg port from vcpkg-windows x64 Release leg; bootstrap fresh windows vcpkg; bump vcpkg baseline

- update vcpkg baseline (microsoft/vcpkg ed403b3, cppfw/vcpkg-repo 8bfce7f)
- fix vcpkg-msys2: bootstrap the windows vcpkg instead of the broken msys bootstrap
- move deploy step to the vcpkg-windows x64|Release leg (release tags only), using
  the new myci 0.1.233 powershell scripts (myci-vcpkg-deploy.ps1 / myci-git-askpass.ps1)

* ci: rename fresh-vcpkg install step with 'for deploy' suffix

* ci: temporarily enable deploy steps on branch (test)

* ci: run msys2 vcpkg-prepare step with bash shell

* ci: merge fresh-vcpkg install into single deploy step; use separate vcpkg-fresh dir

* ci: disable autocrlf for the deploy clone so manifests pass vcpkg's format check

* ci: temporarily use myci fix-askpass-path branch for deploy

* ci: use myci main for the deploy step now that the askpass fix is merged

The fix-askpass-path temporary ref was needed while myci PR #13 was
under review. Now that it is merged to main, point the myci checkout at
main (the script it carries fixes the GIT_ASKPASS path resolution and
mirrors the bash deploy script). Switch to 'latest' once myci 0.1.234
is released.

* ci: remove redundant 'for deploy' from the deploy step name

* ci: drop fresh vcpkg bootstrap from deploy step

The vcpkg bundled with the windows runner handles the published vcpkg
registry identically to a fresh upstream vcpkg for the deploy flow
(verified locally). Keep the autocrlf disable.

* deploy: use bash twin in vcpkg-windows deploy step

myci-vcpkg-deploy.ps1 (and its askpass) is being removed in favor of
the bash twin, which works in Git Bash on windows runners. Invoke it
with shell: bash and add VCPKG_ROOT to PATH since the script calls
vcpkg directly.

* deploy: gate vcpkg deploy step to tagged builds only

The deploy step runs the vcpkg repo update, which should only happen
for release tags, not on every PR or main push. Emits nothing on PRs
the first time the gate is exercised; the tag-gated deploy remains.

* ci: document why bash is needed explicitly in the deploy step

---------

Co-authored-by: Ivan Gagis <igagis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants